<<<<<<< HEAD
// pages/monitor/index.js
const $api = require("../../../api/monitor").API

Page({

  /**
   * 页面的初始数据
   */
  data: {
    bannerSrc:"https://img01.yzcdn.cn/vant/apple-1.jpg",
    lists:"",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var t = this
    // t.gotomonitorlive()
    t.getCameraList()
  },
  getCameraList(){
    var t = this,
    data = {
      member_id:wx.getStorageSync('user').member_id,
      child_id:wx.getStorageSync('child_one').child_id,
      member_type:2,
      institution_id:"",
      class_id:"",
      grade_id:"",
    }
    $api.getCameraList(data).then(res=>{
      console.log(res)
      t.setData({
        lists:res.data
      })
    })
  },
  gotomonitorlive(e){
    var t = this,
    data = {
      member_id:wx.getStorageSync('user').member_id,
      child_id:wx.getStorageSync('child_one').child_id,
      member_type:2,
      institution_id:wx.getStorageSync('classinfo').institution_id,
    }
    $api.getCameraOpen(data).then(res=>{
      wx.navigateBack({
        delta: 1,
      })
  //       wx.navigateTo({
  //         url: '/pages/mine/monitorlive/index?url=' + encodeURIComponent(e.currentTarget.dataset.url),
  //       })
    })
    console.log(e)
   
  }
=======
// pages/monitor/index.js
const $api = require("../../../api/monitor").API

Page({

  /**
   * 页面的初始数据
   */
  data: {
    bannerSrc:"https://img01.yzcdn.cn/vant/apple-1.jpg",
    lists:"",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var t = this
    t.getCameraList()
  },
  getCameraList(){
    var t = this,
    data = {
      member_id:wx.getStorageSync('user').member_id,
      child_id:wx.getStorageSync('child_one').child_id,
      member_type:2,
      institution_id:"",
      class_id:"",
      grade_id:"",
    }
    $api.getCameraList(data).then(res=>{
      console.log(res)
      t.setData({
        lists:res.data
      })
    })
  },
  gotomonitorlive(e){
    var t = this
    console.log(e)
    wx.navigateTo({
      url: '/pages/mine/monitorlive/index?url=' + encodeURIComponent(e.currentTarget.dataset.url),
    })
  }
>>>>>>> 1c9ce1fdc7fcbf1a028b999eb3cd07f698a8a329
})